<script type="text/javascript">  


  function init()
  {
    
    testWebSocket();
  }

  function testWebSocket()
  {
    websocket = new WebSocket("ws://" + window.location.host + "/colectivo/linea/A");
    websocket.onopen = function(evt) { onOpen(evt) };
    websocket.onmessage = function(evt) { onMessage(evt) };
  
  }

  function onOpen(evt)
  {
   // alert("open");
  }
  
  function onMessage(evt)
  {
    alert(evt.data);
  }
  
  
  init();

 
</script>	

